home *** CD-ROM | disk | FTP | other *** search
/ Multimedia Selection / Multimedia Selection Volume One - CD-ROM / MULTIMEDIA SELECTION____________.ISO / utils / ultra50 / ultenv.doc < prev    next >
Encoding:
Text File  |  1993-06-30  |  34.0 KB  |  1,097 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.           ▒██  ▒██ ▒██    ▒████████ ▒███████ ▒███████
  8.           ▒█║  ▒█║ ▒█║       ▒█║    ▒█║  ▒█║ ▒█║  ▒█║
  9.           ▒██  ▒██ ▒██       ▒██    ▒███████ ▒███████    TOOLBOX 5.0
  10.           ▒█║  ▒█║ ▒█║       ▒█║    ▒█║ ▒█║  ▒█║  ▒█║      (c) 1993
  11.           ▒███████ ▒███████  ▒██    ▒██ ▒███ ▒██  ▒██
  12.  
  13.  
  14.               Over 200 Functions to assist you in
  15.                batch files, or just everyday use
  16.  
  17.  
  18.                  (PART TWO OF THE ULT SERIES)
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28. =========== OPTIONS ========================================================
  29.  
  30.  
  31. /#CHAR     COUNT CHARACTERS IN FILE
  32.  
  33.         Counts number of characters in a file.  Places number
  34.         in ULT environmental variable (usually, the number is
  35.         too large to place in the errorlevel).
  36.  
  37.         RETURNS:  number of chars in file (if not more than 255)
  38.                   99    error opening file
  39.  
  40.         EX:     ULTENV /#CHAR this.txt
  41.  
  42.  
  43.  
  44. /#LINE     COUNT LINES IN A FILE
  45.  
  46.         Counts number of lines in a file.  Must be a text file.
  47.  
  48.         RETURNS:  number of lines in file (if not more than 255)
  49.                   99    error opening file
  50.  
  51.         EX:     ULTENV /#LINE this.txt
  52.  
  53.  
  54.  
  55. /#WORD     COUNTS WORDS IN A FILE
  56.  
  57.         Counts number of words  in a file.  Must be a text file.
  58.  
  59.         RETURNS:  number of words in file (if not more than 255)
  60.                   99    error opening file
  61.  
  62.         EX:     ULTENV /#WORD this.txt
  63.  
  64.  
  65.  
  66. /32CRC     CALCULATES THE 32 bit CRC OF A FILE
  67.  
  68.         This uses a 32-BIT lookup table to find the CRC
  69.         of a file.  This can be used to check for viruses,
  70.         or find out if the file has been altered.
  71.         The CRC is placed in the ULT environmental variable.
  72.  
  73.         EX:     ULTENV /32CRC list.com
  74.                 if %ULT%==239845 goto file_ok
  75.                 goto not_ok
  76.                 :file_ok
  77.                 echo List.com passes viruses test, continuing...
  78.                 exit
  79.                 :not_ok
  80.                 echo PROBLEM WITH LIST.COM!  Check file.
  81.  
  82.  
  83.  
  84. /ADD       ADD TWO NUMBERS
  85.  
  86.         This simply adds two numbers on the command line.
  87.         The result is placed in ULT environmental variable,
  88.         and placed in the DOS errorlevel (if the result is
  89.         less than 255).
  90.  
  91.         RETURNS:    result
  92.  
  93.         EX:     ULTENV /ADD 3 8
  94.                 ULTENV /ADD 14 93
  95.  
  96.  
  97.  
  98. /ARCID     IDENTIFY AN ARCHIVE
  99.  
  100.         This identifies an archive (PAK, ZOO, PKZIP, etc),
  101.         returning the type in the ULT environmental variable
  102.         and the errorlevel.
  103.  
  104.           Archive Type        ErrorLevel       ULT Variable
  105.       ------------------------------------------------------
  106.              UNKNOWN             0               Unknown
  107.              .ZIP                1               PKZIP
  108.              .ARJ                2               ARJ
  109.              .LZH                3               LHA
  110.              .SQZ                4               SQUEEZE
  111.              .HAP                5               HAP
  112.              .ARC                6               ARC
  113.              .PAK                7               PAK
  114.              .ZOO                8               ZOO
  115.              .HA                 9               HA
  116.              .AR7                10              AR7
  117.              .DWC                11              DWC
  118.              .SDN                12              PAK
  119.              .HYP                13              HYPER
  120.  
  121.         EX:     for %j in (*.*) do ULTENV /ARCID %j
  122.  
  123.  
  124.  
  125. /BEEP      SOUNDS A BEEP ON THE SPEAKER
  126.  
  127.         Real simple: makes a beep
  128.  
  129.         EX:     ULTENV /BEEP
  130.  
  131.  
  132.  
  133. /BIGFILE   FIND THE BIGGEST FILE
  134.  
  135.         Find the largest file in a directory, and places it
  136.         in the ULT environmental variable.
  137.  
  138.         RETURNS:    number of files found
  139.  
  140.         EX:     ULTENV /BIGFILE
  141.  
  142.  
  143.  
  144. /BOOTDR    GET BOOT DRIVE
  145.  
  146.         This returns the drive that was DOS was booted from.
  147.         Many times, a user boots from drive A: instead of a
  148.         hard drive.
  149.  
  150.         RETURNS:    1   for drive A:
  151.                     2   for drive B:
  152.                     3   for drive C:
  153.                     4   for drive D:
  154.  
  155.                     etc...
  156.  
  157.         EX:     ULTENV /BOOTDR
  158.  
  159.  
  160.  
  161. /BYTECLU   GETS BYTES PER CLUSTER FOR CURRENT DRIVE
  162.  
  163.         This returns the bytes/cluster for the current
  164.         disk drive.  Consult your DOS manual for information
  165.         about disk drives, or a technical manual.
  166.  
  167.         RETURNS:    bytes/cluster of disk
  168.  
  169.         EX:     ULTENV /BYTECLU
  170.  
  171.  
  172.  
  173. /CLEAN     GRAPHICALLY CLEAN DRIVE
  174.  
  175.         Cleans drive by reading disk repeatedly.
  176.  
  177.         EX:     ULTENV /CLEAN b:
  178.                 ULTENV /CLEAN a:
  179.  
  180.  
  181.  
  182. /CLRECHO   ECHO MESSAGE WITH COLOR
  183.  
  184.         This shows a message on the screen using color!
  185.         Many times, you don't want to use /PUTS because
  186.         it requires screen coordinates.  If you simply
  187.         want to print a message at the current line, you
  188.         can use this.
  189.  
  190.         whereas color =    0       BLACK
  191.                            1       BLUE
  192.                            2       GREEN
  193.                            3       CYAN
  194.                            4       RED
  195.                            5       MAGENTA
  196.                            6       BROWN
  197.                            7       LTGRAY
  198.                            8       DKGRAY
  199.                            9       LTBLUE
  200.                            10      LTGREEN
  201.                            11      LTCYAN
  202.                            12      LTRED
  203.                            13      LTMAGENTA
  204.                            14      YELLOW
  205.                            15      WHITE
  206.  
  207.         EX:     ULTENV /CLRECHO "This is a colorful message!" 14
  208.                 ULTENV /CLRECHO "Place the disk in drive A:" 5
  209.  
  210.  
  211.  
  212. /CLS1-8    CLEAR SCREEN EFFECTS 1 - 8
  213.  
  214.         These clear text screen using a variety of cool effects.
  215.         Experiment with them to see the cool zaps, fades and
  216.         other usages.
  217.  
  218.         EX:     ULTENV /CLS1
  219.                 ULTENV /CLS2
  220.                 ULTENV /CLS3
  221.                 ULTENV /CLS4
  222.                 ULTENV /CLS5
  223.                 ULTENV /CLS6
  224.                 ULTENV /CLS7
  225.                 ULTENV /CLS8
  226.  
  227.  
  228.  
  229. /COLOR     CHANGE DOS COLORS
  230.  
  231.         This changes the screen color using ANSI.SYS.  You must have
  232.         ANSI.SYS installed to use this (for more information on
  233.         ANSI.SYS, consult your DOS manual).
  234.         This also changes your prompt to: $p$g.  If you have a
  235.         customized prompt, you may want to avoid this option.
  236.  
  237.         USAGE:  ULTENV /COLOR foreground background
  238.  
  239.         whereas colors can be:   BLACK
  240.                                  RED
  241.                                  GREEN
  242.                                  BROWN
  243.                                  BLUE
  244.                                  PURPLE
  245.                                  CYAN
  246.                                  WHITE
  247.  
  248.         EX:     ULTENV /COLOR BLACK WHITE
  249.                         changes color to black on white.
  250.  
  251.                 ULTENV /COLOR CYAN BLACK
  252.                         changes color to cyan on black.
  253.  
  254.  
  255.  
  256. /CR        WAIT FOR THE CARRIAGE RETURN KEY
  257.  
  258.         Pauses the computer until the RETURN key is pressed.  Any other
  259.         key does nothing.  Once the return key has been pressed, the
  260.         program exits normally.
  261.  
  262.         EX:     ULTENV /CR
  263.  
  264.  
  265.  
  266. /DIRLST    SHOWS A SIX COLUMN DIRECTORY DISPLAY
  267.  
  268.         Displays an unsorted, six column directory.  The typical
  269.         output looks like this:
  270.  
  271.  VGALIB  .LIB▌TURBOC  .CFG▌THELP   .CFG▌ULTENV  .DOC▌DPMI16BI.OVL▌DPMIINST.EXE▌
  272.  DPMILOAD.EXE▌DPMIMEM .DLL▌DPMIRES .EXE▌SFX     .C  ▌MATH        ▌PRJ2MAK .EXE▌
  273.  TLIB    .EXE▌TOUCH   .COM▌TRIGRAPH.EXE▌TCHELP  .TCH▌THELP   .COM▌FUCK        ▌
  274.  PRJCFG  .EXE▌PRJCNVT .EXE▌TASM2MSG.EXE▌UU          ▌ULT4_C  .ZIP▌TEMC    .EXE▌
  275.  TRANCOPY.EXE▌CPP     .EXE▌MAKE    .EXE▌MAKER   .EXE▌OBJXREF .COM▌TCC     .EXE▌
  276.  
  277.         Yes, I know, it is severely packed, but convenient and saves
  278.         much space on the command line.
  279.  
  280.         EX:     ULTENV /DIRLST
  281.  
  282.  
  283.  
  284. /DIRPOP    RETRIEVE DIRECTORY FROM ENVIRONMENT
  285.  
  286.         This function retrieves the directory in the ULTDIR environmental
  287.         variable and changes to it.  This would be useful if you changed
  288.         to a directory, then wanted to return where you started.
  289.  
  290.         You could say:  ULTENV /DIRPUSH
  291.                         cd\wp51\data
  292.                         wp.exe
  293.                         ULTENV /DIRPOP
  294.  
  295.         EX:     ULTENV /DIRPOP
  296.  
  297.  
  298.  
  299. /DIRPUSH   STORE DIRECTORY TO ENVIRONMENT
  300.  
  301.         This function places the current directory in the ULTDIR
  302.         environmental variable.  This would be useful if you changed
  303.         to a directory, then wanted to return where you started.
  304.  
  305.         You could say:  ULTENV /DIRPUSH
  306.                         cd\wp51\data
  307.                         wp.exe
  308.                         ULTENV /DIRPOP
  309.  
  310.         EX:     ULTENV /DIRPUSH
  311.  
  312.  
  313.  
  314. /DISKFREE  PLACES THE FREE SPACE OF CURRENT DISK IN ENVIRONMENT
  315.  
  316.         Puts current disk free space in ULT environmental variable.
  317.  
  318.         EX:     ULTENV /DISKFREE
  319.  
  320.  
  321.  
  322. /DOSDATE   SETS THE DOS DATE
  323.  
  324.         If you use DATE in a batch file, the user must manually set
  325.         the damn date himself.  This allows a batch file to independently
  326.         set the DOS date without stopping for user input.
  327.  
  328.         USAGE:  ULTENV /DOSDATE month day year
  329.  
  330.         EX:     ULTENV /DOSDATE 4 15 1993
  331.                 ULTENV /DOSDATE 12 25 1998
  332.  
  333.  
  334.  
  335. /DOSTIME   SETS THE DOS TIME
  336.  
  337.         If you use TIME in a batch file, the user must manually set
  338.         the damn time himself.  This allows a batch file to independently
  339.         set the DOS time without stopping for user input.
  340.         NOTE: Uses military time (24 clock)
  341.  
  342.         USAGE:  ULTENV /DOSTIME hour minute
  343.  
  344.         EX:     ULTENV /DOSTIME 4 15    (4:15 am)
  345.                 ULTENV /DOSTIME 12 0    (12:00 noon)
  346.                 ULTENV /DOSTIME 23 25   (11:25 pm)
  347.  
  348.  
  349.  
  350. /DUMP      PLACES CURRENT ENVIRONMENT INTO BATCH FILE
  351.  
  352.         This is really cool!  It grabs all of your current
  353.         environmental variables and puts them in a batch file
  354.         for later use.  That way, if you accidentally change
  355.         a variable, or a program screws up your environment,
  356.         you can return it to normal by typing: DUMP.BAT
  357.  
  358.         USAGE:  ULTENV /DUMP
  359.  
  360.           Your current environment is now in a file named DUMP.BAT,
  361.           which looks similar to:
  362.  
  363.                 @SET COMSPEC=C:\!\4DOS\4DOS.COM
  364.                 @SET CMDLINE=unerase.exe
  365.                 @SET PATH=C:\!\UTILS;\!\DOS;\TC\BIN;\!\ND
  366.                 @SET PM=ndd,asc,rew
  367.                 @SET PROMPT=$e[0;30;47m$p$g
  368.  
  369.         Now to restore this environment, type: DUMP, and all the
  370.         variables are set back to normal.  Trust me, this is a
  371.         lifesaver when you mess up a variable or two!
  372.  
  373.         EX:     ULTENV /DUMP
  374.  
  375.  
  376.  
  377. /ECHO      PRINTS A BLANK LINE
  378.  
  379.         The DOS ECHO command does not allow you to print a
  380.         blank line.  This simply allows you to.
  381.  
  382.         EX:     ULTENV /ECHO
  383.  
  384.  
  385.  
  386. /EMSFREE   PLACES THE FREE EMS AMOUNT INTO ENVIRONMENT
  387.  
  388.         Puts current free EMS in ULT environmental variable.
  389.         Be sure to check the existence of ems before getting
  390.         this number.  If called, and no EMS manager is present, the
  391.         results of this function are unpredictable.
  392.  
  393.         EX:     ULTENV /EMSFREE
  394.  
  395.  
  396.  
  397. /EMSTOT    PLACES THE EMS TOTAL INTO ENVIRONMENT
  398.  
  399.         Puts current total EMS in ULT environmental variable.
  400.         Be sure to check the existence of ems before getting
  401.         this number.  If called, and no EMS manager is present, the
  402.         results of this function are unpredictable.
  403.  
  404.         EX:     ULTENV /EMSTOT
  405.  
  406.  
  407.  
  408. /EXPMEM    PLACES THE EXPANDED MEMORY TOTAL INTO ENVIRONMENT
  409.  
  410.         Puts current total expanded memory in ULT environmental variable.
  411.         Be sure to check the existence of ems before getting
  412.         this number.  If called, and no expanded memory manager is present,
  413.         the results of this function are unpredictable.
  414.  
  415.         EX:     ULTENV /EXPMEM
  416.  
  417.  
  418.  
  419.  
  420. /EXTMEM    PLACES THE EXTENDED MEMORY TOTAL INTO ENVIRONMENT
  421.  
  422.         Puts current total expanded memory in ULT environmental variable.
  423.         Be sure to check the existence of ems before getting
  424.         this number.  If called, and no extended memory manager is present,
  425.         the results of this function are unpredictable.
  426.  
  427.         EX:     ULTENV /EXTMEM
  428.  
  429.  
  430.  
  431. /FILEFIT   WILL A FILE FIT INTO DISK DRIVE?
  432.  
  433.         When copying a file using your batch file, you must first
  434.         find out if the file you want to copy will fit on the
  435.         target drive.  This merely tells you yes or no.
  436.  
  437.         USAGE:  ULTENV /FILEFIT file drive
  438.  
  439.                 whereas drive = 1  A:
  440.                                 2  B:
  441.                                 3  C:
  442.                                 4  D:       etc....
  443.  
  444.         RETURNS:    1   File will fit
  445.                     0   Not enough space on target drive
  446.  
  447.         EX:     echo Attempting to copy LIST.COM onto C: drive
  448.                 ULTENV /FILEFIT list.com 3
  449.                 if errorlevel 1 goto file_ok
  450.                 if errorlevel 0 goto too_big
  451.  
  452.  
  453.  
  454. /FILSIZ    GET FILE(s) SIZE
  455.  
  456.         This gathers the size of a file (or several files, and
  457.         totals them into the ULT environmental variable.
  458.  
  459.         EX:     ULTENV /FILSIZ list.com    (places the size of list.com in ULT)
  460.                 ULTENV /FILSIZ *.doc       (places the size of all .DOC files in ULT)
  461.  
  462.  
  463.  
  464. /GETPAGE   GET CURRENT VIDEO PAGE NUMBER
  465.  
  466.         Exactly like it says, get the current video page number.
  467.         To alter the video page, use ULT /PAGE.
  468.  
  469.         RETURNS:   Page number
  470.  
  471.  
  472.  
  473. /GETSTR    GET A STRING FROM THE KEYBOARD
  474.  
  475.         This gets a string (no echo) from the user, and places it in
  476.         the ULT environmental variable.
  477.         Since the input does not echo to the screen, this can also be
  478.         used for password input.  Or you can combine WINDOWS (using
  479.         ULT /BOX option) and ULT /PUTS for a professional look.
  480.  
  481.         EX:     echo Enter Password:
  482.                 ULTENV /GETSTR
  483.                 IF %ULT% == "MYPASSWORD" goto correct_password
  484.                 goto bad_password
  485.  
  486.  
  487.  
  488. /GETVOL    GET VOLUME LABEL NAME
  489.  
  490.         This gets the current disk drive's volume label.  The name
  491.         is then placed in the ULT environmental variable.
  492.  
  493.         RETURNS:   99   no volume label found
  494.  
  495.         EX:     ULTENV /GETVOL
  496.  
  497.  
  498.  
  499. /GOTO      GOTO SCREEN COORDINATES
  500.  
  501.         Moves the cursor to different screen coordinates.  Effectively,
  502.         this moves the current row, since once the program exits,
  503.         the cursor automatically is reset to column ZERO.
  504.  
  505.         USAGE:   ULTENV /GOTO x y
  506.  
  507.         EX:     ULTENV /GOTO 0 13   (moves to column 0, row 13)
  508.  
  509.  
  510.  
  511. /GRAPHIC    PLACES GRAPHIC ADAPTER IN THE ENVIRONMENT
  512.  
  513.         This gets the current video adapter, and places the result
  514.         in the ULT environmental variable.  The numerical value is
  515.         also placed in the DOS errorlevel.
  516.  
  517.     ERRORLEVEL       ULT Variable
  518.    --------------------------------------------------------
  519.        0             No video card
  520.        1             Monochrome
  521.        2             EGA in Monochrome mode
  522.        3             MCGA in Monochrome mode
  523.        4             VGA in Monochrome mode
  524.        5             Hercules
  525.        6             Hercules Plus
  526.        7             Hercules InColor
  527.        8             CGA
  528.        9             EGA
  529.        10            MCGA
  530.        11            VGA
  531.  
  532.         EX:     ULTENV /GRAPHIC
  533.                 if %ULT% == "CGA" goto cga_video
  534.                 if %ULT% == "EGA" goto ega_video
  535.                 if %ULT% == "VGA" goto vga_video
  536.  
  537.  
  538.  
  539. /HID&SYS   DISPLAY HIDDEN AND SYSTEM FILES
  540.  
  541.         Shows all the hidden and system files in the current directory.
  542.         The ULT environmental variable is then set to the total size
  543.         of the directory, and the ERRORLEVEL is set to the total
  544.         hidden/system files found.
  545.  
  546.         RETURNS:   Total hidden/system files in current directory
  547.  
  548.         EX:     ULTENV /HID&SYS
  549.  
  550.  
  551.  
  552. /HYPER     IS HYPERDISK INSTALLED?
  553.  
  554.         HYPERDISK is a popular Shareware disk cache program.
  555.         NOTE: Hyperdisk is also responsible for my disk crash
  556.               that made me lose 5,000 files in 374 directories.
  557.               The damn thing decided to write over both copies
  558.               of my File Allocation Table.  In my opinion, stay
  559.               away from this HYPERDISK program, and purchase
  560.               another commercial cache utility instead!
  561.  
  562.         RETURNS:    1   Hyperdisk is installed
  563.                     0   not found
  564.  
  565.         EX:     ULTENV /HYPER
  566.  
  567.  
  568.  
  569. /ISDIR     IS DIRECTORY IN PATH?
  570.  
  571.         This searches the current PATH for a name.  You can use this
  572.         to determine if a directory is on the path, or if any other
  573.         name is on there.  The case of the letters does not matter,
  574.         since both the name you specified and the path are capitalized.
  575.  
  576.         USAGE:  ULTENV /ISDIR name
  577.  
  578.         RETURNS:     1    directory found!
  579.                      0    name not found
  580.  
  581.         EX:     ULTENV /ISDIR c:\utils
  582.                 ULTENV /ISDIR \wp51
  583.  
  584.  
  585.  
  586. /KFF       FORM FEED REMOVER
  587.  
  588.         Do you have any files you want printed, but want all those
  589.         pesky form feeds removed?  This does the job perfectly, without
  590.         actually altering the original file.
  591.         Just type: ULT /KFF infile outfile
  592.  
  593.         The outfile will contain no form feeds.
  594.  
  595.         EX:     ULTENV /KFF forms.doc forms2.doc
  596.                 ULTENV /KFF wp.doc  wp2.doc
  597.  
  598.  
  599.  
  600. /MAXDRIVE  NUMBER OF LOGICAL DRIVES
  601.  
  602.         This returns the number of logical drives on your computer.
  603.  
  604.         RETURNS:    Number of logical drives
  605.  
  606.         EX:     ULTENV /MAXDRIVE
  607.  
  608.  
  609.  
  610. /MEMORY    SHOWS A DUMP OF THE MEMORY
  611.  
  612.         This displays information about currently loaded programs
  613.         in the memory.
  614.  
  615.         EX:     ULTENV /MEMORY
  616.  
  617.  
  618.  
  619. /MODEM     SEND A STRING TO THE MODEM
  620.  
  621.         Sends a message to the modem.  The modem is first initialized
  622.         to the COM port you specify, then the message you specified
  623.         is sent into the port, and a reply echoed to the command line.
  624.         The program then waits for a key to be pressed, then exits.
  625.  
  626.                 In summary:     1)  type in ULTENV /MODEM then port number,
  627.                                     then the message
  628.                                 2)  wait for a response from the modem
  629.                                 3)  press any key to exit
  630.  
  631.         USAGE:  ULTENV /MODEM port message
  632.  
  633.         RETURNS:     Value of key pressed (see ULT /GETKEY for values)
  634.  
  635.         EX:     ULTENV /MODEM 1 "AT D T 555-3423"    (dials a phone number on COM 1)
  636.                 ULTENV /MODEM 3 "AT"      (opens COM 3, then should return "OK")
  637.  
  638.  
  639.  
  640. /MUL       MULTIPLY TWO NUMBERS
  641.  
  642.         This multiplies two numbers, then places the result in the ULT
  643.         environmental variable, and the errorlevel (if the number is too
  644.         big, errorlevel will be set to 255).
  645.  
  646.         USAGE:  ULTENV /MUL number number
  647.  
  648.         RETURNS:     answer (if not over 255)
  649.  
  650.         EX:     ULTENV /MUL 25 84  (multiplies 25 X 84, and sets ULT to the answer)
  651.  
  652.  
  653.  
  654. /NUMCLU    NUMBER OF CLUSTERS FOR CURRENT DRIVE
  655.  
  656.         Returns the number of clusters for the current disk drive.  For more
  657.         information about clusters/bytes/sectors, consult a technical
  658.         manual.
  659.  
  660.         RETURNS:   number of clusters
  661.  
  662.         EX:     ULTENV /NUMCLU
  663.  
  664.  
  665.  
  666. /OVERFILL  FILL THE SCREEN WITH A STRING
  667.  
  668.         This clears the screen to light gray, then prints the string
  669.         specified 200 times, each with a different color.
  670.         You really have to experiment with this one to fully
  671.         understand.
  672.  
  673.         EX:     ULTENV /OVERFILL "Dave's Program"
  674.                 ULTENV /OVERFILL "Cool Batch File"
  675.  
  676.  
  677.  
  678. /PICKFILE  CHOOSE A FILE AND PUT IT IN ENVIRONMENT
  679.  
  680.         This prints a window full of filenames on the screen, then
  681.         allows the user to pick one.  Once chosen, the filename
  682.         and directory will be placed in the ULT environmental
  683.         variable.
  684.  
  685.         EX:     ULTENV /PICKFILE
  686.                 echo You chose to copy %ULT%, correct?
  687.  
  688.  
  689.  
  690. /PRNAVAIL  CHECKS TO SEE IF A PRINTER IS CONNECTED  (LPT1)
  691.  
  692.         Many times, you may want to find out if the user has a
  693.         printer hooked up and on line.  This allows you to
  694.         check.
  695.  
  696.         RETURNS:        1       printer is ready/on-line
  697.                         0       no printer available
  698.  
  699.         EX:     ULTENV /PRNAVAIL
  700.  
  701.  
  702.  
  703. /PRNBOLD   PRINTS A BOLD FACED STRING ON THE PRINTER (LPT1)
  704.  
  705.         Prints the string by overstriking it three times.
  706.  
  707.         EX:     ULTENV /PRNBOLD "Your momma"
  708.                 ULTENV /PRNBOLD "I got the manager's job!"
  709.  
  710.  
  711.  
  712.  
  713. /PRNCHR    SEND CONTROL CODE TO PRINTER (LPT1)
  714.  
  715.         This sends a single control code to the printer (LPT1).
  716.         The usual codes for a dot-matrix would be:
  717.  
  718.        Code            Usage
  719.      -------------------------------------------------
  720.         7               Ring printer's bell
  721.         9               Horizontal tab (forward)
  722.         10              Line feed
  723.         11              Vertical tab
  724.         12              Form feed
  725.         13              Carriage return
  726.         14              Double width text on
  727.         15              Compressed text on
  728.         18              Compressed text off
  729.         20              Double width text off
  730.         24              Clear printer buffer
  731.  
  732.         Consult your printer's manual for its individual codes.
  733.  
  734.         EX:     ULTENV /PRNCHR 12    (send a form feed)
  735.                 ULTENV /PRNCHR 24    (clear printer buffer)
  736.  
  737.  
  738.  
  739. /PRNUND    PRINTS AN UNDERLINED STRING ON THE PRINTER (LPT1)
  740.  
  741.         Prints the string by overstriking it three times.
  742.  
  743.         EX:     ULTENV /PRNUND "Your momma"
  744.                 ULTENV /PRNUND "I got the manager's job!"
  745.  
  746.  
  747.  
  748. /S10 - 29  Different Sounds
  749.  
  750.         Using /S10 - /S29 plays a variety of different sounds.  It's
  751.         best to experiment in order to hear them.
  752.  
  753.         EX:     ULTENV  /S10
  754.                 ULTENV  /S11
  755.                 ULTENV  /S12
  756.                 ULTENV  /S13
  757.                 ULTENV  /S14
  758.                 ULTENV  /S15
  759.                 ULTENV  /S16
  760.                 ULTENV  /S17
  761.                 ULTENV  /S18
  762.                 ULTENV  /S19
  763.                 ULTENV  /S20
  764.                 ULTENV  /S21
  765.                 ULTENV  /S22
  766.                 ULTENV  /S23
  767.                 ULTENV  /S24
  768.                 ULTENV  /S25
  769.                 ULTENV  /S26
  770.                 ULTENV  /S27
  771.                 ULTENV  /S28
  772.                 ULTENV  /S29
  773.  
  774.  
  775.  
  776.  
  777. /SATTR     GET SCREEN ATTRIBUTE
  778.  
  779.         This returns the current screen color attribute.  For more
  780.         information on colors and attributes, see "HOW TO MAKE BOXES"
  781.         section in the back of the ULT.DOC text file.
  782.  
  783.         RETURNS:     color value
  784.  
  785.         EX:     ULTENV /SATTR
  786.  
  787.  
  788.  
  789. /SECCLU    SECTORS PER CLUSTER OF THE CURRENT DRIVE
  790.  
  791.         Returns the sectors per clusters for the current disk drive.
  792.         For more information about clusters/bytes/sectors, consult a
  793.         technical manual.
  794.  
  795.         RETURNS:   sector per clusters
  796.  
  797.         EX:     ULTENV /SECCLU
  798.  
  799.  
  800.  
  801. /SHEIGHT   GET THE SCREEN HEIGHT
  802.  
  803.         This returns the current screen height (the maximum Y value).
  804.  
  805.         RETURNS:   maximum screen Y value  (usually 24/28/33/43 or 50)
  806.  
  807.         EX:     ULTENV /SHEIGHT
  808.  
  809.  
  810.  
  811. /SMALLFILE GET THE SMALLEST FILE
  812.  
  813.         Find the smallest file in a directory, and places it
  814.         in the ULT environmental variable.
  815.  
  816.         RETURNS:    number of files found
  817.  
  818.         EX:     ULTENV /SMALLFILE
  819.  
  820.  
  821.  
  822. /STUFF     PUT KEYSTOKES INTO KEYBOARD BUFFER
  823.  
  824.         This stuffs the keyboard buffer with up to 100 characters.
  825.  
  826.         USAGE:  ULTENV /STUFF string
  827.  
  828.         EX:     ULTENV /STUFF "dir /w"
  829.                 ULTENV /STUFF "del *.bak"
  830.  
  831.  
  832.  
  833. /SUBT      SUBTRACT TWO NUMBERS
  834.  
  835.         This simply subtracts two numbers on the command line.
  836.         The result is placed in ULT environmental variable,
  837.         and placed in the DOS errorlevel (if the result is
  838.         less than 255).  If the result has a decimal point: 3.254,
  839.         the result is the number before the decimal.
  840.  
  841.         IE: 3.245341 will return only 3
  842.             64.52081 will return only 64
  843.  
  844.         RETURNS:    result
  845.  
  846.         EX:     ULTENV /SUBT 3 8
  847.                 ULTENV /SUBT 14 93
  848.  
  849.  
  850.  
  851. /SUBDIR    SHOWS A DIRECTORY PLUS SUBDIRECTORIES
  852.  
  853.         This totals the size of a directory + subs, and displays
  854.         them in an organized and cute manner.
  855.  
  856.         EX:     ULTENV /SUBDIR \wp51
  857.                 ULTENV /SUBDIR c:\
  858.  
  859.  
  860.  
  861. /SWIDTH    GET THE SCREEN WIDTH
  862.  
  863.         This returns the current screen width (the maximum X value).
  864.  
  865.         RETURNS:   maximum screen X value  (usually 80)
  866.  
  867.         EX:     ULTENV /SWIDTH
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874. /TOTCONV   TOTAL CONVENTIONAL MEMORY INTO ENVIRONMENT
  875.  
  876.         This places the total conventional memory into the
  877.         ULT environmental variable.
  878.  
  879.         EX:     ULTENV /TOTCONV
  880.                 echo You have a total of %ULT% memory on your system.
  881.  
  882.  
  883.  
  884. /TOUCH     SETS A FILE's DATE AND TIME TO THE CURRENT DATE/TIME
  885.  
  886.         This resets a file date/time to the current date/time.
  887.         It's really a time saver!
  888.  
  889.         EX:     ULTENV /TOUCH list.com                 (resets list.com)
  890.                 for %j in (*.doc) ULTENV /TOUCH %j     (resets all .DOC files)
  891.  
  892.  
  893.  
  894.  
  895. /WAITFOR   WAIT FOR CHARACTER
  896.  
  897.         This simply waits for a character to be pressed by the
  898.         user.  All other keystrokes are ignored.
  899.  
  900.         For a listing of characters and their values, see
  901.         /GETKEY in the included ULT.DOC file.
  902.  
  903.         EX:     ULTENV /WAITFOR
  904.  
  905.  
  906.  
  907. /ZERO      DELETE ALL ZERO BYTE FILES
  908.  
  909.         This searches the current directory, and deletes all
  910.         zero byte files.
  911.  
  912.              ** REGISTERED USERS: Be Careful! **
  913.  
  914.         EX:     ULTENV /ZERO
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.                           THE DOS ENVIRONMENT
  932.  
  933.     This is a general discussion of the DOS Environment for those who may
  934.     not be sufficiently familiar with it.  This section of ULT concentrates
  935.     a lot on the ULT variable, therefore this discussion is necessary.
  936.  
  937.     The DOS Environment is a small area (usually) of memory that DOS automat-
  938.     ically allocates to every program that it is asked to load or run.  The 
  939.     "master" Environment is the original Environment allocated to COMMAND.COM 
  940.     or 4DOS or whichever command processor you are using.  The original size 
  941.     of the Environment can be set in later versions of DOS by using the SHELL 
  942.     command in your CONFIG.SYS file.  However, the setting of Environment size 
  943.     is not a SHELL command function, but is a command processor option.  For 
  944.     example, the COMMAND.COM /E: switch lets you set the size if you are using 
  945.     COMMAND.COM as your command processor.  For documentation look under such 
  946.     topics as SHELL, COMMAND, and "Configuring Your System" in your DOS 
  947.     manual.  Since most new programs make extensive use of the Environment, it 
  948.     is important to be sure enough Environment space is allocated to accom- 
  949.     modate them all.  If you see the error message "Out of Environment Space", 
  950.     you know that you do not have enough allocated.
  951.  
  952.     You can view the contents of the Environment by issuing the SET command
  953.     of DOS with no arguments at the DOS prompt.  You will see a sequence of 
  954.     variable names, each followed by the "=" sign and the string value as- 
  955.     signed to the variable.  For example, COMSPEC=C:\COMMAND.COM.  You can 
  956.     also store string information in the Environment with the SET command by 
  957.     specifying it in the same manner as it is displayed.  For example, SET 
  958.     PATH=C:\;C:\DOS.  Do not place any spaces on either side of the "=" sign 
  959.     unless you intend for the space to be either a part of the variable name 
  960.     or a part of the string.  When DOS loads and runs a COM or EXE program 
  961.     file, that program receives a copy of the Environment as it is at that 
  962.     time, trimmed down so that only a few bytes remain free.  This copy does 
  963.     not change unless the program that owns it changes it.
  964.  
  965.     Note that some DOS "shells" shield the master Environment from programs
  966.     that are executed by the shell. If you find that to be the case, the in- 
  967.     formation will usually be available to the BATch file from the Environment 
  968.     of the secondary command processor loaded by the shell as is usually 
  969.     necessary to run a BATch file.
  970.  
  971.     Also, when running from a shell there may be problems with
  972.     "Out of Environment space" since DOS does not usually allocate excess En- 
  973.     vironment space to child processes.  4DOS provides a means to ensure that 
  974.     copies of the Environment have sufficient space available.  Check the doc- 
  975.     umentation for your shell program to see if it can make sufficient En- 
  976.     vironment space available.
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985. ========= OTHER MISCELLANEOUS NOTES =======================================
  986.  
  987.         ULTENV will exit with an errorlevel of 0 unless an error
  988.         occurred.  If there's a problem, ULTENV aborts with a
  989.         99 errorlevel.
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.             ╤═══════════════════════════════════════════════════════╤
  1007.             │     This is the ShareWare version of ULTRA ToolBox    │
  1008.             │                                                       │
  1009.             │           To register yours send $10.00 to:           │
  1010.             │                                                       │
  1011.             │                     David Smith                       │
  1012.             │                    1104 Mason Dr                      │
  1013.             │                    Hurst TX 76053                     │
  1014.             │                                                       │
  1015.             │         or $20.00 gets you all of my utils and        │
  1016.             │        lifetime registration plus free upgrades       │
  1017.             ╧═══════════════════════════════════════════════════════╧
  1018.  
  1019.         Register the toolbox once, and you never have to register
  1020.         again.  All future upgrades are free!
  1021.  
  1022.         My goal is to have 250 total options for the toolbox.  You
  1023.         will never have to look for batch utilities again!
  1024.  
  1025.         See the enclosed ULT.EXE for more utilities ...
  1026.  
  1027.  
  1028.    Please send a cheque or money        For VISA/MasterCard order, call
  1029.    order of US$10 to                    1-800-2424-775 or 1-713-524-6394
  1030.  
  1031.        David Smith                          Public (Software) Library
  1032.        1104 Mason Drive                     P.O.Box 35705
  1033.        Hurst TX 76053                       Houston, TX 77235-5705
  1034.                                             USA
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.    ███████╗ ██╗   ██╗ ██████╗  ██████╗   ██████╗  ██████╗  ████████╗ ██████╗
  1054.    ██╔════╝ ██║   ██║ ██╔══██╗ ██╔══██╗ ██╔═══██╗ ██╔══██╗ ╚══██╔══╝ ╚════██╗
  1055. ╓──███████╗ ██║   ██║ ██████╔╝ ██████╔╝ ██║   ██║ ██████╔╝    ██║      ▄███╔╨─╖
  1056. ║  ╚════██║ ██║   ██║ ██╔═══╝  ██╔═══╝  ██║   ██║ ██╔══██╗    ██║      ▀▀══╝  ║
  1057. ║  ███████║ ╚██████╔╝ ██║      ██║      ╚██████╔╝ ██║  ██║    ██║      ██╗    ║
  1058. ║  ╚══════╝  ╚═════╝  ╚═╝      ╚═╝       ╚═════╝  ╚═╝  ╚═╝    ╚═╝      ╚═╝    ║
  1059. ║                                                                             ║
  1060. ║                                                                             ║
  1061. ║      Support for this program is available in the following ways:           ║
  1062. ║                                                                             ║
  1063. ║                                                                             ║
  1064. ║          ╓──┐ ╓──┐ ╓─╥─┐ ╥──┐ ╥  ┬  ╓─┐ ╥──┐ ╥──┐ ╥  ┬ ╥──┐                 ║
  1065. ║          ║    ║  │ ║ ║ │ ╟──┘ ║  │  ╙─┐ ╟─   ╟─┬┘ ╙╖┌┘ ╟─                   ║
  1066. ║          ╙──┘ ╙──┘ ╨ ╨ ┴ ╨    ╙──┘ ╙──┘ ╨──┘ ╨ ┴   ╙┘  ╨──┘                 ║
  1067. ║          User ID:  71441,2723                                               ║
  1068. ║          I usually log on every other day and check my mail.                ║
  1069. ║                                                                             ║
  1070. ║                                                                             ║
  1071. ║                       ▄▄▄▄▄▄  ▄▄▄▄▄▄  ▄▄▄▄▄▄▄                               ║
  1072. ║                       █ ▄▄ █▄ █ ▄▄ █▄ █ ▄▄▄▄█                               ║
  1073. ║                       █ ▄▄▄ █ █ ▄▄▄ █ █▄▄▄▄ █                               ║
  1074. ║                       █▄▄▄▄▄█ █▄▄▄▄▄█ █▄▄▄▄▄█                               ║
  1075. ║          Drop me a line on the MotherBoard II Bulletin Board                ║
  1076. ║                     David Smith   (214) 642-1287                            ║
  1077. ║                                                                             ║
  1078. ║                                                                             ║
  1079. ║                 ▄██▄   ▄██▄  ▄███████▄   ▄█▄  ▄██▄                          ║
  1080. ║                 █████▄█████ ████▀▀▀████ █████ ████                          ║
  1081. ║                 ███████████ ████▄▄▄████ █████ ████                          ║
  1082. ║                 ████   ████ ███████████ █████ ████                          ║
  1083. ║                 ████   ████ ████   ████ █████ ████▄▄▄▄▄▄▄                   ║
  1084. ║                 ▀██▀   ▀██▀ ▀██▀   ▀██▀  ▀█▀   ▀████████▀                   ║
  1085. ║                               Write to:                                     ║
  1086. ║                                                                             ║
  1087. ║                              David Smith                                    ║
  1088. ║                            1104 Mason Dr.                                   ║
  1089. ║                            Hurst TX 76053                                   ║
  1090. ║                                                                             ║
  1091. ╙─────────────────────────────────────────────────────────────────────────────╜
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.